/* 
 * File:   processing.h
 * Author: Elias Capito, Jonathan Neuhaus
 *
 * Created on 6. mai 2010, 15:12
 */

#ifndef _PROCESSING_H
#define	_PROCESSING_H

#ifdef __APPLE__
#include <opencv/cv.h>
#include <opencv/highgui.h>
#else
#include <cv.h>
#include <highgui.h>
#endif
using namespace cv;

class Processing {
public:
    static IplImage** getHSV(IplImage* image);

    static IplImage* thresholdImgGray(IplImage* image, int min, int max, int type);

    static IplImage* invertImgGray(IplImage* image);

    static IplImage* morphErodeImg(IplImage* image, int iteration);

    static IplImage* morphDilateImg(IplImage* image, int iteration);

    static IplImage* morphOpenImg(IplImage* image, int iteration);

    static IplImage* morphCloseImg(IplImage* image, int iteration);

    static IplImage* subImgGray(IplImage* image, IplImage* sub);

    static IplImage* equalizeHistGray(IplImage* image);

    static float* detectCircleGray(IplImage* image, int minRadius, int maxRadius);

    static IplImage* crop(IplImage* image, int centerX, int centerY, int diameter);

    static int* getTabNeedles(IplImage* image, int centerX, int centerY, int radius);

    static int* getTime(int* needleTab);

private:
    static IplConvKernel* elm3x3Rect;
};

#endif	/* _PROCESSING_H */

